1. Field of the Invention
The present invention relates to a focus detecting apparatus, and more specifically, to an improvement of a correlation calculating algorithm in a focus detecting apparatus using TTL (Through The Lens) phase difference detecting method.
2. Description of the Related Art
A focus detecting apparatus using a so-called TTL phase difference detecting method such as disclosed in U.S. Pat. No. 4,636,624 has been known, in which a condenser lens and first and second image re-forming lenses are provided behind a predetermined focal plane of a taking lens, and an amount of defocus, which corresponds to a difference amount between an image formed by the taking lens and the predetermined focal plane, is detected as an amount of displacement of a distance between first and second images re-formed by the first and second image re-forming lenses.
FIG. 1 is a schematic diagram showing the above mentioned conventional apparatus. Referring to the figure, the focus detecting apparatus comprises a taking lens TL, a film equivalent plane F, a condenser lens CL, image re-forming lenses L.sub.1 and L.sub.2, an aperture mask M limiting light incidental to the image re-forming lenses L.sub.1 and L.sub.2, apertures M.sub.1 and M.sub.2 of the aperture mask M and charge storing type image sensors I.sub.1 and I.sub.2. An image in the range between the points A and B on the film equivalent plane F are re-formed as an image in the range between the points A.sub.1 and B.sub.1 and an image in the range between the points A.sub.2 and B.sub.2, respectively, on the image sensors I.sub.1 and I.sub.2 by means of the condenser lens CL and the image re-forming lenses L.sub.1 and L.sub.2. The image sensors I.sub.1 and I.sub.2 output two image signals corresponding to intensity distribution of the two images formed thereon to a correlation calculating circuit 1, and the distance between the two images formed on the image sensors I.sub.1 and I.sub.2 are determined in the correlation calculating circuit 1, since the image signals have a certain correlation.
FIG. 2 shows, in detail, a focus detecting optical system in the above described focus detecting apparatus. If the object is in-focus and a point image C is present on the film equivalent plane F, point images C.sub.1 and C.sub.2 are formed on the image sensors I.sub.1 and I.sub.2. The distance between the point images at this time is represented as S.sub.0. When the object is in front focus and a point image D is present in front of the film equivalent plane F, point images D.sub.1 and D.sub.2 are formed on the image sensors I.sub.1 and I.sub.2. The distance between the point images at this time is smaller than S.sub.0. If the object is in rear focus and a point image E is present behind the film equivalent plane F, point images E.sub.1 and E.sub.2 are formed on the image sensors I.sub.1 and I.sub.2. The distance between the point images at this time is larger than S.sub.0. In this manner, when we represent the distance between images in the in-focus state by S.sub.0, the distance between images in the front focus state is smaller than S.sub.0, and the distance between images in the rear focus state is larger than S.sub.0. The distance between images is approximately proportional to the defocus amount. Therefore, the in-focus/out-of-focus state can be determined by detecting the distance between images, and if the object is out of focus, the amount and direction of defocus can be detected.
Now, if there are three point images A, B and C on the film equivalent plane F, the optical paths for forming point images C.sub.1 and C.sub.2 from the point image C on the optical axis are symmetrical about the optical axis l.sub.0. However, the optical paths for forming point images A.sub.1 and A.sub.2 based on the point image A out of the optical axis (the optical paths for forming point images B.sub.1 and B.sub.2 from the point image B) are asymmetrical about the optical axis l.sub.0. Therefore, brightness and size of the point images A.sub.1 and A.sub.2 and B.sub.1 and B.sub.2, respectively, may not the same, even if the optical system for focus detection is manufactured in perfect symmetry about the optical axis l.sub.0. In this manner, as the height of image (hereinafter referred to as an "image height") from the optical axis l.sub.0 is increased, there will be less and less coincidence between the brightness and size of the two images generated from the same point image. Consequently, the brightness distributions of the two images on the image sensors I.sub.1 and I.sub.2 are not always symmetrical. Consequently, the distance between images determined by the correlation calculating circuit 1 becomes inaccurate, causing an error in focus detection. This is called an image height error.
As to the point images C, D and E on the optical axis, there will be no image height error generated. However, if the optical system for focus detection is formed not perfectly symmetrically, for example, when the area or shape of a pair of openings M.sub.1 and M.sub.2 of the aperture mask M is different from each other, the brightness or size of the two images formed based on the same point image does not coincide with each other, which also causes error in focus detection.
In view of the foregoing, various methods for evaluating correlation between the two images as exactly as possible to determine the distance between images accurately even in such cases have been proposed. For example, Japanese Patent Laying-Open No. 61-103114 discloses a correlation calculating method. In accordance with this method, one center of light intensity distribution (hereinafter referred to as a light intensity center) is calculated for the entire optical image on the image sensor I.sub.1 serving as a base portion, a light intensity center is calculated in each of a plurality of partial regions of the optical image on the image sensor I.sub.2 serving as a reference portion (with each partial region assumed to be of the same length as the base portion), the light intensity center of each partial region in the reference portion is compared with the light intensity center of the base portion, and when the light intensity center of one partial region coincides with the light intensity center of the base portion, it is determined that the partial region corresponds to the base portion. However, in this method, when the intensity centers of two or more partial regions in the reference portion coincide with the light intensity center of the base portion, which of the partial regions in the reference portion corresponds to the base portion can not be determined.
Further, since it is assumed that each of the partial region is of the same length as the base portion, it can not be assumed that the brightness distribution in that region is substantially flat. Therefore, influence of the brightness distribution when the light intensity center of a partial region near the base portion is calculated is different from that in calculating the light intensity center of a partial region distant from the base portion. Consequently, errors in focus detection derived from asymmetry of the brightness distribution can not be avoided.